<h1>Jugadores</h1>
<p><?php echo $this->Html->link('Nuevo Jugador', array('controller' => 'players','action' => 'add')); ?></p>
<table>
    <tr>
        <th>Id</th>
        <th>Nombre</th>
        <th>Acciones</th>
        <th>Creado</th>
    </tr>

<!-- Here's where we loop through our $posts array, printing out post info -->

    <?php foreach ($players as $player): ?>
    <tr>
        <td><?php echo $player['Player']['id']; ?></td>
        <td>
            <?php
                echo $this->Html->link(
                    $player['Player']['name'],
                    array('action' => 'view', $player['Player']['id'])
                );
            ?>
        </td>
        <td>
            <?php
                echo $this->Form->postLink(
                    'Delete',
                    array('action' => 'delete', $player['Player']['id']),
                    array('confirm' => 'Are you sure?')
                );
            ?>
            <?php
                echo $this->Html->link(
                    'Edit', array('action' => 'edit', $player['Player']['id'])
                );
            ?>
        </td>
        <td>
            <?php echo $player['Player']['created']; ?>
        </td>
    </tr>
    <?php endforeach; ?>

</table>